<extend name="Public:layout"/>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>编辑菜单</strong></div>
        <div class="body-content">
            <form method="post" class="form-x ajax-submit" action="{:U('edit')}">
                <input type="hidden" name="menu_id" value="{$info.menu_id}">
                <div class="form-group">
                    <div class="label">
                        <label>菜单名称：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" value="{$info.menu_name}" name="menu_name" data-validate="required:请输入菜单名称">
                        <div class="tips" title=""></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>上级菜单：</label>
                    </div>
                    <div class="field">
                        <select name="parent_id" class="input">
                            <option value="0" >顶级菜单</option>
                            <foreach name="allMenu" item="vo">
                                <option value="{$vo.menu_id}" <if condition="$info['parent_id'] eq $vo['menu_id']">selected</if>>|-{$vo.menu_name}</option>
                                <foreach name="vo.sub" item="v">
                                    <option value="{$v.menu_id}" <if condition="$info['parent_id'] eq $v['menu_id']">selected</if>>&nbsp;&nbsp;&nbsp;|_{$v.menu_name}</option>
                                </foreach>
                            </foreach>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>菜单描述：</label>
                    </div>
                    <div class="field">
                        <textarea type="text" class="input" name="remark" style="height:80px;">{$info.remark}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>图标：</label>
                    </div>
                    <div class="field">
                        <input type="hidden" class="input w50" name="icon" value="{$info.icon|default='icon-caret-right'}">
                        <span id="icon" class="{$info.icon|default='icon-circle'}" style="font-size:35px;"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>排序：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input w50" name="sort" value="{$info.sort|default=99}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>状态：</label>
                    </div>
                    <div class="field">
                        <select name="status" class="input w50">
                            <option value="1">正常</option>
                            <option value="0">禁用</option>
                        </select>
                        <div class="tips" title=""></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label></label>
                    </div>
                    <div class="field">
                        <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</block>